Conventional IP (Internet Protocol, internet protocol) network mainly bears data service in a best-effort delivery mode, where quality of service seems unimportant. However, with the rapid development of the internet with IP technology as a core, as well as the emergence of a variety of new services such as VOIP (Voice over Internet Protocol, voice over internet protocol), VPN (Virtual Private Network, virtual private network), etc., the IP network has turned from a simple data network into a bearer network with commercial value,. Therefore, it is necessary for the IP network to provide each type of services, which the IP network bears, with corresponding quality of service.
However, in the prior art, the transmission path of a data stream is fixed. Once the current port is congested, data streams can only be discarded according to the priority level of the data streams, which affects the quality of service of the network greatly.